/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function loadWindows(){
    var div = $('divHeader'); var url = "header.html";
    getPageHTML(url, div);
    var div = $('divFoot'); var url = "foot.html";
    getPageHTML(url, div);
}
function importJS(nameFile, dir){
    if (dir==null)  dir = "";
    else            dir = dir+"/";
    nameFile = nameFile.replace(/\s+/gi, "");
    files = nameFile.split(",");
    for (var i=0;i<files.length;i++){
        var script = document.createElement('script');
        script.src = dir + files[i]+".js";
        document.getElementsByTagName('head')[0].appendChild(script);
    }
}
function importCSS(cssFiles, dir){
    if (dir==null)  dir = "";
    else            dir = dir+"/";
    cssFiles = cssFiles.replace(/\s+/gi, "");
    files = cssFiles.split(",");
    for (var i=0;i<files.length;i++){
        var cssLink=document.createElement("link");
        cssLink.setAttribute("rel", "stylesheet");
        cssLink.setAttribute("type", "text/css");
        cssLink.setAttribute("href", dir + files[i]+".css");
        
        document.getElementsByTagName("head")[0].appendChild(cssLink);
    }
}